<?php 
include_once __DIR__.'/../../vendor/autoload.php';  
if (strpos(strtolower(PHP_OS), 'win') === 0) {
    class_alias(\Windows\Events\Select::class, \Workerman\Events\Select::class);
}        
class DD{ 
    public function __invoke($a){
        print_r([$a,$this]); 
    }
    public function ia($a){
        print_r([$a,$this]);
    }
    public static function ib($a){
        print_r([$a,$this]);
    } 
}

\Hprose\Future\co(function(){
     
    ($result = new DD) instanceof DD?yield from $result:[];
    $c = 3;


});



//0:Closure
Actor::spawn(function(){ });

//1:function
Actor::spawn('foo');

//2:static method
Actor::spawn([DD::class,'ib']);

//3:object method
//Actor::spawn([new DD,'ib']);

//4:static string
Actor::spawn("DD::ib");

//5:parent method
Actor::spawn([DD::class,'parent::ib']);

//6:object invoke
//Actor::spawn(new DD);
 